home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
0769B.ZIP
/
CLIPSCR2.ASM
< prev
next >
Wrap
Assembly Source File
|
1987-10-23
|
3KB
|
122 lines
; Title: CLIPSCR2.ASM
; Author: James J. Orlowski, M.D.
; John Willis
; Ideas: Suggested by scrolling routines in
; ROLLSCRN.ASM by F. Ho written in 1985 and in public domain
; Date: 03/87
; Syntax: DO BOXCLS WITH TOP, LEFT, BOTTOM, RIGHT, ATTR, LINES, DIR
; Note: - rolls CLEAR the box on the screen between
; the coordinates TOP, LEFT to BOTTOM, RIGHT
; and sets background attribute to ATTR
; Can be used to roll screen LINES between 1 and 24
; But if LINES = 0 then clears box
; and DIRection 6 = up or 7 = down
public BOXCLS ;
;
extrn _PARNI:far ; declare as external of type far
extrn _RET:far ;
;
;
datasg segment para 'DATA' ; start of data segment
;
TOP db 0h ; top -
LEFT db 0h ; left corner
BOTTOM db 0h ; bottom -
RIGHT db 0h ; right corner
ATTR db 0h ; attribute number
LINES db 0h ; number of lines to scroll up
DIR db 0h ; direction: 6 = up, 7 = down
;
datasg ends ; end of data segment
;
;
_prog segment byte ; start of code segment
assume cs:_prog,ds:datasg,es:_prog
;
BOXCLS proc far ; start of BOXCLS process
push bp ; preserve return address
mov bp,sp
push ds ; save registers
push es ;
mov ax,1 ; take 1st para
push ax
call _PARNI
add sp,2 ; restore stack
mov TOP,al ; assign 1st para to TOP
mov ax,2 ; take 2nd para
push ax
call _PARNI
add sp,2
mov LEFT,al ; assign to LEFT
mov ax,3 ; take 3rd para
push ax
call _PARNI
add sp,2
mov BOTTOM,al ; assign to BOTTOM
mov ax,4 ; take 4th para
push ax
call _PARNI
add sp,2
mov RIGHT,al ; assign to right
mov ax,5 ; take 5th para
push ax
call _PARNI
add sp,2
mov ATTR,al ; assign to ATTR
mov ax,6 ; take 6th para
push ax
call _PARNI
add sp,2
mov LINES,al ; assign to LINES
mov ax,7 ; take 7th para
push ax
call _PARNI
add sp,2
mov DIR,al ; assign to DIR
push cx ; preserve coordinate
push dx ; registers
mov ch,TOP ; assign TOP to high CX
mov cl,LEFT ; assign LEFT to low CX
mov dh,BOTTOM ; assign BOTTOM to high DX
mov dl,RIGHT ; assign RIGHT to low DX
xor ax,ax ; zero out AX
push ax
mov ah,DIR ; assign DIR to high AX
mov al,LINES ; assign LINES to low AX
; ah = ROM-BIOS Video Service #
mov bh,ATTR ; assign ATTR to bh
shl bh,1 ; bh register to shift left 4 times
shl bh,1 ; to multiply by 16 to convert
shl bh,1 ; to background attribute
shl bh,1
int 10h ; issue video int
pop ax ; restore registers
pop dx ; before calling RETs
pop cx
pop es
pop ds
pop bp
call _RET ; Clipper return (actual cleaning)
ret ; actual physical return
BOXCLS endp ; end of process
;
_prog ends
end